package com.aaa.util;

import com.aaa.pojo.Student;

/**
 * 默认ajax返回的数据
 */
public class DefaultMsg {

    private Integer code=200;
    private Integer success=1;
    private String error;
    //请求额外往前台传递的参数
    private Object target;


    public Object getTarget() {
        return target;
    }

    public void setTarget(Object target) {
        this.target = target;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Integer getSuccess() {
        return success;
    }

    public void setSuccess(Integer success) {
        this.success = success;
    }

    public String getError() {
        return error;
    }

    public void setError(String error) {
        this.error = error;
    }

    public static void main(String[] args) {
        //创建一个学生对象
        Student row  =new Student();
        row.setSid(2);
        row.setSname("张三");
        System.out.println(row.getSname());
        Student form = new Student();
        form.setSid(row.getSid());
        form.setSname(row.getSname());
        System.out.println(form.getSname());
        form.setSname("李四");
        System.out.println(row.getSname());
    }
}
